import { axiosGet, axiosPost, axiosPut, axiosDelete } from '/@/api/RequestBase';
import { SqlSugarPagedList, BaseKeywordPageInput } from '/@/api/BaseDto';

import { TraShenQingDanInput } from './dto/TraShenQingDanInput';
import { TraShenQingDanOutput } from './dto/TraShenQingDanOutput';
import { TraShenQingInput } from './dto/TraShenQingInput';
import { TraShenQingOutput } from './dto/TraShenQingOutput';
import { TraShenQingPageOutput } from './dto/TraShenQingPageOutput';
import { TraShenQingHuanZheInput } from './dto/TraShenQingHuanZheInput';
import { TraShenQingHuanZheOutput } from './dto/TraShenQingHuanZheOutput';
import { TraShenQingYongXueInput } from './dto/TraShenQingYongXueInput';
import { TraShenQingYongXueOutput } from './dto/TraShenQingYongXueOutput';
import { TraShenQingJianYan } from './dto/TraShenQingJianYan';
import { UpdateYongXueShenQingXinXiInput } from './dto/UpdateYongXueShenQingXinXiInput';
import { TraShenQingPeiFaXuePageInput } from './dto/TraShenQingPeiFaXuePageInput'
import { CheckHuanZheLiShiCiShuInput } from './dto/CheckHuanZheLiShiCiShuInput';
import { CheckHuanZheLiShiCiShuOutput } from './dto/CheckHuanZheLiShiCiShuOutput';
import { ShenQingShenHeInput } from './dto/ShenQingShenHeInput';
import { CheckHuanZheLatestInfoOutput } from './dto/CheckHuanZheLatestInfoOutput';
import { CheckLiShiPageInput } from './dto/CheckLiShiPageInput';
import { HuanZheLiShiFuHeOutput } from './dto/HuanZheLiShiFuHeOutput';
import { HuanZheLiShiFaXueOutput } from './dto/HuanZheLiShiFaXueOutput';
import { HuanZheLiShiPeiXueOutput } from './dto/HuanZheLiShiPeiXueOutput';
import { PeiFaXueInfoOutput } from './dto/PeiFaXueInfoOutput';

export type {
	TraShenQingDanInput,
	TraShenQingDanOutput,
	TraShenQingInput,
	TraShenQingOutput,
	TraShenQingPageOutput,
	TraShenQingHuanZheInput,
	TraShenQingHuanZheOutput,
	TraShenQingYongXueInput,
	TraShenQingYongXueOutput,
	TraShenQingJianYan,
	UpdateYongXueShenQingXinXiInput,
	TraShenQingPeiFaXuePageInput,
	CheckHuanZheLiShiCiShuInput,
	CheckHuanZheLiShiCiShuOutput,
	ShenQingShenHeInput,
	CheckHuanZheLatestInfoOutput,
	CheckLiShiPageInput,
	HuanZheLiShiFuHeOutput,
	HuanZheLiShiFaXueOutput,
	HuanZheLiShiPeiXueOutput,
	PeiFaXueInfoOutput
};

const service = 'traShenQing/'; // 要写后面的斜杠, 不要写前面的斜杠

export const TraShenQingApi = {
	page: (data: BaseKeywordPageInput) => {
		return axiosPost<SqlSugarPagedList<TraShenQingPageOutput>>(service + 'page', data);
	},
	get: (id: string) => {
		return axiosGet<TraShenQingDanOutput>(service + `get/${id}`);
	},
	add: (data: TraShenQingDanInput) => {
		return axiosPost<TraShenQingOutput>(service + 'add', data);
	},
	update: (data: TraShenQingDanInput) => {
		return axiosPut<boolean>(service + 'update', data);
	},
	updateHuanZhe: (data: TraShenQingHuanZheInput) => {
		return axiosPost<boolean>(service + 'updateHuanZhe', data);
	},
	updateYongXue: (data: TraShenQingYongXueInput) => {
		return axiosPost<boolean>(service + 'updateYongXue', data);
	},
	updateYongXueShenQingXinXi: (data: UpdateYongXueShenQingXinXiInput) => {
		return axiosPost<boolean>(service + 'updateYongXueShenQingXinXi', data);
	},
	peiFaXuePage: (data: TraShenQingPeiFaXuePageInput) => {
		return axiosPost<SqlSugarPagedList<TraShenQingPageOutput>>(service + 'peiFaXuePage', data);
	},
	getPeiFaXueInfo: (id: string) => {
		return axiosGet<PeiFaXueInfoOutput>(service + `getPeiFaXueInfo/${id}`);
	},
	/** 获取患者历史输血、复核、配血、输血反应次数 */
	checkHuanZheLiShiCiShu: (data: CheckHuanZheLiShiCiShuInput) => {
		return axiosPost<CheckHuanZheLiShiCiShuOutput>(service + 'checkHuanZheLiShiCiShu', data);
	},
	shangJiYiShengShenHe: (data: ShenQingShenHeInput) => {
		return axiosPost<null>(service + 'shangJiYiShengShenHe', data);
	},
	keZhuRenShenHe: (data: ShenQingShenHeInput) => {
		return axiosPost<null>(service + 'keZhuRenShenHe', data);
	},
	shuXueKeShenHe: (data: ShenQingShenHeInput) => {
		return axiosPost<null>(service + 'shuXueKeShenHe', data);
	},
	checkHuanZheLatestInfo: (data: CheckHuanZheLiShiCiShuInput) => {
		return axiosPost<CheckHuanZheLatestInfoOutput>(service + 'checkHuanZheLatestInfo', data);
	},
	checkLiShiFuHePage: (data: CheckLiShiPageInput) => {
		return axiosPost<SqlSugarPagedList<HuanZheLiShiFuHeOutput>>(service + 'checkLiShiFuHePage', data);
	},
	checkLiShiShuXuePage: (data: CheckLiShiPageInput) => {
		return axiosPost<SqlSugarPagedList<HuanZheLiShiFaXueOutput>>(service + 'checkLiShiShuXuePage', data);
	},
	checkLiShiPeiXuePage: (data: CheckLiShiPageInput) => {
		return axiosPost<SqlSugarPagedList<HuanZheLiShiPeiXueOutput>>(service + 'checkLiShiPeiXuePage', data);
	}
};
